<template>
	<div class="head">
		<div class="main">
			<img class="logo" src="../assets/img/logo.png" />
			<div class="right">
				<div class="rap"></div>
				<router-link to="/LoginIndex"><span>登录</span></router-link>/<router-link to="/LoginRegister"><span>注册</span></router-link>
			</div>
		</div>
	</div>
</template>

<script>
	import Cookie from "../fetch/cookie.js"
	import {
		mapGetters,
		mapActions
	} from 'vuex'
	export default {
		name: 'Head',
		data() {
			return {
				visible2: false,
				activeIndex2: '/'
			}
		},
		computed: {
			...mapGetters([
				'UserInfo_data',
				'headerIndex'
			])
		},
		methods: {
			...mapActions({
				setToken: "setToken",
				setLogincodestart: "setLogincodestart",
				setLoginpassstart: "setLoginpassstart",
				getheaderIndex: "getheaderIndex"
			}),
			handleSelect(index) {
				this.getheaderIndex(index)
			},
			Logout() {
				Cookie.Cookiedel("token")
				this.setToken("");
				this.getheaderIndex("/")

			}
		}
	}
</script>

<style scoped lang="less">
	.head {
		background: #333;
		.main {
			width: 1100px;
			height: 66px;
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin: auto;
			.logo {
				height: 50px;
			}
			.right{
				height: 100%;
				display: flex;
				align-items: center;
				color: #fff;
				span{
					color: #fff;
				}
				.rap{
					width: 25px;
					height: 25px;
					background: #fff;
					border-radius: 50%;
					margin-right: 10px;
				}
			}
		}

		

	}
</style>
